package io.renren.modules.generator.service.impl;

import io.renren.modules.generator.entity.vo.DecideInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.generator.dao.DecideInfoDao;
import io.renren.modules.generator.entity.DecideInfoEntity;
import io.renren.modules.generator.service.DecideInfoService;


@Service("decideInfoService")
public class DecideInfoServiceImpl extends ServiceImpl<DecideInfoDao, DecideInfoEntity> implements DecideInfoService {

    @Autowired
    private DecideInfoDao decideInfoDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<DecideInfoEntity> page = this.page(
                new Query<DecideInfoEntity>().getPage(params),
                new QueryWrapper<DecideInfoEntity>()
        );

        return new PageUtils(page);
    }

    /**
     * 导出
     */
    public List<DecideInfoVo> getDecideInfoEntity(DecideInfoEntity decideInfoEntity){
        return decideInfoDao.getDecideInfoEntity(decideInfoEntity);
    }
    /**
     * 导入
     */
    public int getDrDecideInfo(List<DecideInfoVo> list){
        return decideInfoDao.getDrDecideInfo(list);
    }

}